Zabbix 3.2 : Install
2016/09/14 |
Install Zabbix 3.2 which is an enterprise open source monitoring system.
It's possible to monitor not only Linux but Windows, Solaris, IBM AIX and others. |
|
[1] | |
[2] | |
[3] | |
[4] | Install some other required packages and Zabbix repository. |
[root@dlp ~]# yum -y install php-mysql php-gd php-xml php-bcmath [root@dlp ~]# yum -y install http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
|
[5] | Install Zabbix server. |
[root@dlp ~]# yum -y install zabbix-get zabbix-server-mysql zabbix-web-mysql zabbix-agent |
[6] | Create a database for Zabbix. |
[root@dlp ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 10 Server version: 5.5.50-MariaDB MariaDB Server Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
create database zabbix; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on zabbix.* to zabbix@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on zabbix.* to zabbix@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
[root@dlp ~]# exit Bye cd /usr/share/doc/zabbix-server-mysql-*/ [root@dlp zabbix-server-mysql-3.2.0]# gunzip create.sql.gz [root@dlp zabbix-server-mysql-3.2.0]# mysql -u root -p zabbix < create.sql Enter password: |
[7] | Configure and start Zabbix Server. |
[root@dlp ~]#
vi /etc/zabbix/zabbix_server.conf # line 82: add DBHost=localhost
# line 116: add DB password for Zabbix DBPassword=password
systemctl start zabbix-server [root@dlp ~]# systemctl enable zabbix-server |
[8] | Configure and start Zabbix Agent to monitor Zabbix Server itself. |
[root@dlp ~]#
vi /etc/zabbix/zabbix_agentd.conf # line 95: specify Zabbix server Server= 127.0.0.1
# line 136: specify Zabbix server ServerActive= 127.0.0.1
# line 147: change to the own hostname Hostname= dlp.srv.world
systemctl start zabbix-agent [root@dlp ~]# systemctl enable zabbix-agent |
[9] | Change httpd settings like follows. |
[root@dlp ~]#
vi /etc/httpd/conf.d/zabbix.conf # line 10: add access permittion for Zabbix Web frontend # Require all granted
Require ip 127.0.0.1 10.0.0.0/24
# line 20: uncomment and change to your timezone php_value date.timezone Asia/Tokyo
systemctl restart httpd |
[10] | If SELinux is enabled, change boolean setting. |
[root@dlp ~]# setsebool -P httpd_can_connect_zabbix on |
[11] | If Firewalld is running, allow Zabbix related ports. |
[root@dlp ~]# firewall-cmd --add-service={http,https} --permanent success [root@dlp ~]# firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent success [root@dlp ~]# firewall-cmd --reload success |